The present invention relates to the field of disk drives, and in particular, to a system for maximizing use of a data buffer that stores a defective sector list.
Most personal computers include at least one disk drive system for storing data in a non-volatile manner, so that the data is not lost when the personal computer is turned off or loses power. From the perspective of the disk drive system this data is known as user data. Existing disk drive systems store user data in data sectors on the recording surface of the disk or disks in the disk drive system. Because some of the data sectors may be determined to be defective by the manufacturer (or during use), a list of the defective data sectors is stored on the disk. The disk drive system maintains the defective sector list so that the defective data sectors can be avoided during normal disk drive operations.
The disk drive system includes control circuitry that handles user data transfers between the user (the personal computer) and the disk device. The control circuitry receives the user data from the user and stores the user data in a buffer. The control circuitry then retrieves the user data from the buffer and forwards the user data to the disk device. When the user data is subsequently read from the disk device, the control circuitry retrieves the user data from the disk device, and stores the user data in the buffer. The control circuitry then retrieves the user data from the buffer and forwards the user data to the user.
Among other things, the buffer compensates for the different data transfer rates of the user and the disk device. For example, the user may transfer user data to the control circuitry faster than the disk device can store the user data. The control circuitry temporarily stores the user data in the buffer to give the disk device time to store the user data. In addition, the buffer may already store some user data when it is requested by the user. The control circuitry immediately transfers this user data from the buffer to the user without expending the additional time to retrieve the user data from the disk device.
A processor within the control circuitry executes instructions to control the operation of the disk drive system. In some systems, the instructions are stored in a memory within the control circuitry. Upon system start-up, the processor retrieves and executes instructions from the memory to initiate operation of the disk drive system. One of the instructions executed by the processor causes the defective sector list to be transferred from the disk device to the same buffer as where the user data transfers are stored. The processor uses the defective sector list stored in the buffer to avoid using the defective data sectors on the disk device.
Prior to the transfer of the defective sector list to the buffer, the processor is unaware of the actual size of the defective sector list. Therefore, the processor must reserve enough buffer space to hold the maximum possible size of the defective sector list. If the actual size of the list is less than the reserved buffer space, extra buffer space is reserved that need not be reserved. Thus, the defective sector list uses up valuable buffer memory that is not available to store user data transfers.
A reduction in the buffer memory that is reserved for user data transfers adversely affects system performance because additional read/write operations are required to transfer the same amount of user data. Also, there is an increase in the likelihood of buffer overflows that stop data transfers. The reduction in buffer memory for data transfers also decreases the likelihood that user data is already in the buffer memory when it is requested by the user. As can be appreciated, disk drive systems could operate faster if a technique were provided to reduce the buffer memory used by the defective sector list. This reduction in buffer memory reserved for the list could improve system performance by enlarging the buffer memory that is available for user data transfers.
It is against this background and the problems of the prior art that the present invention has been developed.
The invention overcomes the above problems by reducing the buffer memory that is reserved for the defective sector list and enlarging the buffer memory that is reserved for user data transfers. The disk drive system performs faster, efficient user data transfers because the reserved area in the buffer for user data transfers is enlarged.
The invention comprises methods, systems, and processor-readable mediums for use in disk drive systems. Control circuitry retrieves a defective sector list from a disk device and stores the defective sector list in a buffer. The control circuitry determines a list size of the defective sector list stored in a reserved list area in the buffer. The control circuitry then determines a new size of the reserved list area based on the list size of the defective sector list. The control circuitry reduces the reserved list area based on the new size of the reserved list area. The control circuitry then enlarges a reserved user area in the buffer based on the new size of the reserved list area wherein the reserved user area stores the user data. The instructions that cause the control circuitry to carry out the above-described process are stored in a memory.
The invention provides a distinct advance in the art by enlarging the buffer memory that is reserved for user data transfers. The increase in the buffer memory for user data transfers improves system performance in numerous ways. First, the average number of read/write operations that are required to transfer a given amount of user data are decreased. Second, the likelihood of buffer overflows is reduced because more user data can be stored within the buffer. Third, when the user data is requested by the user, the likelihood that user data is already in the buffer is greater. Therefore, the user data can be immediately transferred to the user from the buffer without additional read or write operations.